<template>
  <section v-loading="loading">

    <template v-if="sendDataList && sendDataList.length">
      <ui-title :title="$t('message.setting.cusMes.t1')" />
      <!-- 消息：通用消息规则设置 -->
      <MessageTable 
        style="margin:24px 0 36px;" 
        :show-external-column="false"
        v-model="sendDataList"
        @getListByModule="getListByModule"
      />
    </template>

  </section>
</template>

<script>

// 表格组件
import MessageTable from '../table/MessageTable'

export default {
  components:{
    MessageTable
  },

  data(){
    return{
      loading:false,

      module:'universal',

      formData:{},
      // 发送规则列表数据
      sendDataList:[],
    }
  },

  provide(){
    return {
      module:this.module,
      flowData: {}
    }
  },

  mounted(){
    this.getListByModule()
  },

  methods:{
    getListByModule(){
      this.$emit('getListByModule', 'universalMessage', this.module)
    },

    // 子组件调用，更新数据
    updateList({ sendDataList }){
      this.sendDataList = sendDataList
    }
  }
}

</script>


<style lang="scss" scoped>
.switch-contain{
    margin:0 8px 0 12px;
}
.statue{
    height: 22px;
    font-size: 14px;
    font-weight: 400;
    color: #595959;
    line-height: 22px;
}
</style>